#pragma once

//
#include "SDL.h"
#include "SDL_image.h"

#include "TextureManager.h"

#include <string>
#include <stdlib.h>
#include "Point.h"
#include "Sprite.h"
#include <string>


class Animation
{
public:

	Animation(void);
	Animation(Sprite _sprite, SDL_Renderer* _pRenderer);
	~Animation(void);
	//
	// function load image

	void load(std::string fileName, std::string id, SDL_Renderer* pRenderer);
	void draw(std::string id, SDL_Renderer* pRenderer, SDL_RendererFlip = SDL_FLIP_NONE);
	void drawAnimation(std::string id );
	void stopAnimation();
	void resumeAnimation();
	void update(float &dt);
	void rederAnimation();
	void setPosition(Point);
	void setTimeDelay(float);

protected:
private:

	SDL_Renderer* m_pRenderer;
	Sprite m_sprite;
	float timeDelay;
	float timeOfGame;

	Point position;
	int index;
};